home *** CD-ROM | disk | FTP | other *** search
/ The Atari Compendium / The Atari Compendium (Toad Computers) (1994).iso / files / prgtools / mint / mint96sb.zoo / src / proto.h < prev    next >
Encoding:
Text File  |  1992-10-21  |  14.1 KB  |  347 lines

  1. /* bios.c */
  2. long ARGS_ON_STACK getmpb P_((void *ptr));
  3. long bconstat P_((int dev));
  4. long bconin P_((int dev));
  5. long bconout P_((int dev, int c));
  6. long ARGS_ON_STACK ubconstat P_((int dev));
  7. long ARGS_ON_STACK ubconin P_((int dev));
  8. long ARGS_ON_STACK ubconout P_((int dev, int c));
  9. long ARGS_ON_STACK rwabs P_((int rwflag, void *buffer, int number, int recno, int dev, long lrecno));
  10. long ARGS_ON_STACK setexc P_((int number, long vector));
  11. long ARGS_ON_STACK tickcal P_((void));
  12. long ARGS_ON_STACK getbpb P_((int dev));
  13. long bcostat P_((int dev));
  14. long ARGS_ON_STACK ubcostat P_((int dev));
  15. long ARGS_ON_STACK mediach P_((int dev));
  16. long ARGS_ON_STACK drvmap P_((void));
  17. long ARGS_ON_STACK kbshift P_((int mode));
  18. long ARGS_ON_STACK bflush P_((void));
  19. void init_bios P_((void));
  20. long ARGS_ON_STACK do_bconin P_((int dev));
  21. int checkkeys P_((void));
  22.  
  23. /* xbios.c */
  24. long ARGS_ON_STACK supexec P_((Func funcptr, long a1, long a2, long a3, long a4, long a5));
  25. long ARGS_ON_STACK midiws P_((int, const char *));
  26. int mapin P_((int));
  27. long ARGS_ON_STACK uiorec P_((int));
  28. long ARGS_ON_STACK rsconf P_((int, int, int, int, int, int));
  29. long ARGS_ON_STACK bconmap P_((int));
  30. long ARGS_ON_STACK cursconf P_((int, int));
  31. void init_xbios P_((void));
  32.  
  33. /* console.c */
  34. long file_instat P_((FILEPTR *f));
  35. long file_outstat P_((FILEPTR *f));
  36. long file_getchar P_((FILEPTR *f, int mode));
  37. long file_putchar P_((FILEPTR *f, long c, int mode));
  38. long ARGS_ON_STACK c_conin P_((void));
  39. long ARGS_ON_STACK c_conout P_((int c));
  40. long ARGS_ON_STACK c_auxin P_((void));
  41. long ARGS_ON_STACK c_auxout P_((int c));
  42. long ARGS_ON_STACK c_prnout P_((int c));
  43. long ARGS_ON_STACK c_rawio P_((int c));
  44. long ARGS_ON_STACK c_rawcin P_((void));
  45. long ARGS_ON_STACK c_necin P_((void));
  46. long ARGS_ON_STACK c_conws P_((const char *str));
  47. long ARGS_ON_STACK c_conrs P_((char *buf));
  48. long ARGS_ON_STACK c_conis P_((void));
  49. long ARGS_ON_STACK c_conos P_((void));
  50. long ARGS_ON_STACK c_prnos P_((void));
  51. long ARGS_ON_STACK c_auxis P_((void));
  52. long ARGS_ON_STACK c_auxos P_((void));
  53. long ARGS_ON_STACK f_instat P_((int fh));
  54. long ARGS_ON_STACK f_outstat P_((int fh));
  55. long ARGS_ON_STACK f_getchar P_((int fh, int mode));
  56. long ARGS_ON_STACK f_putchar P_((int fh, long c, int mode));
  57.  
  58. /* dos.c */
  59. long ARGS_ON_STACK s_version P_((void));
  60. long ARGS_ON_STACK s_uper P_((long new_ssp));
  61. long ARGS_ON_STACK t_getdate P_((void));
  62. long ARGS_ON_STACK t_setdate P_((int date));
  63. long ARGS_ON_STACK t_gettime P_((void));
  64. long ARGS_ON_STACK t_settime P_((int time));
  65. long ARGS_ON_STACK s_yield P_((void));
  66. long ARGS_ON_STACK p_renice P_((int pid, int delta));
  67. long ARGS_ON_STACK p_nice P_((int delta));
  68. long ARGS_ON_STACK p_getpid P_((void));
  69. long ARGS_ON_STACK p_getppid P_((void));
  70. long ARGS_ON_STACK p_getpgrp P_((void));
  71. long ARGS_ON_STACK p_setpgrp P_((int pid, int newgrp));
  72. long ARGS_ON_STACK p_getuid P_((void));
  73. long ARGS_ON_STACK p_getgid P_((void));
  74. long ARGS_ON_STACK p_geteuid P_((void));
  75. long ARGS_ON_STACK p_getegid P_((void));
  76. long ARGS_ON_STACK p_setuid P_((int id));
  77. long ARGS_ON_STACK p_setgid P_((int id));
  78. long ARGS_ON_STACK p_usrval P_((long arg));
  79. long ARGS_ON_STACK p_umask P_((unsigned mode));
  80. long ARGS_ON_STACK p_domain P_((int arg));
  81. long ARGS_ON_STACK p_rusage P_((long *r));
  82. long ARGS_ON_STACK p_setlimit P_((int i, long v));
  83. long ARGS_ON_STACK p_pause P_((void));
  84. long ARGS_ON_STACK t_alarm P_((long x));
  85. long ARGS_ON_STACK s_ysconf P_((int which));
  86. void init_dos P_((void));
  87.  
  88. /* dosdir.c */
  89. long ARGS_ON_STACK d_setdrv P_((int d));
  90. long ARGS_ON_STACK d_getdrv P_((void));
  91. long ARGS_ON_STACK d_free P_((long *buf, int d));
  92. long ARGS_ON_STACK d_create P_((const char *path));
  93. long ARGS_ON_STACK d_delete P_((const char *path));
  94. long ARGS_ON_STACK d_setpath P_((const char *path));
  95. long ARGS_ON_STACK d_getpath P_((char *path, int drv));
  96. long ARGS_ON_STACK d_getcwd P_((char *path, int drv, int size));
  97. long ARGS_ON_STACK f_setdta P_((DTABUF *dta));
  98. long ARGS_ON_STACK f_getdta P_((void));
  99. long ARGS_ON_STACK f_sfirst P_((const char *path, int attrib));
  100. long ARGS_ON_STACK f_snext P_((void));
  101. long ARGS_ON_STACK f_attrib P_((const char *name, int rwflag, int attr));
  102. long ARGS_ON_STACK f_delete P_((const char *name));
  103. long ARGS_ON_STACK f_rename P_((int junk, const char *old, const char *new));
  104. long ARGS_ON_STACK d_pathconf P_((const char *name, int which));
  105. long ARGS_ON_STACK d_opendir P_((const char *path, int flags));
  106. long ARGS_ON_STACK d_readdir P_((int len, long handle, char *buf));
  107. long ARGS_ON_STACK d_rewind P_((long handle));
  108. long ARGS_ON_STACK d_closedir P_((long handle));
  109. long ARGS_ON_STACK f_xattr P_((int flag, const char *name, XATTR *xattr));
  110. long ARGS_ON_STACK f_link P_((const char *old, const char *new));
  111. long ARGS_ON_STACK f_symlink P_((const char *old, const char *new));
  112. long ARGS_ON_STACK f_readlink P_((int buflen, char *buf, const char *linkfile));
  113. long ARGS_ON_STACK d_cntl P_((int cmd, const char *name, long arg));
  114. long ARGS_ON_STACK f_chown P_((const char *name, int uid, int gid));
  115. long ARGS_ON_STACK f_chmod P_((const char *name, unsigned mode));
  116. long ARGS_ON_STACK d_lock P_((int mode, int drv));
  117.  
  118. /* dosfile.c */
  119. FILEPTR * do_open P_((const char *name, int mode, int attr, XATTR *x));
  120. long do_pclose P_((PROC *p, FILEPTR *f));
  121. long do_close P_((FILEPTR *f));
  122. long ARGS_ON_STACK f_open P_((const char *name, int mode));
  123. long ARGS_ON_STACK f_create P_((const char *name, int attrib));
  124. long ARGS_ON_STACK f_close P_((int fh));
  125. long ARGS_ON_STACK f_read P_((int fh, long count, char *buf));
  126. long ARGS_ON_STACK f_write P_((int fh, long count, const char *buf));
  127. long ARGS_ON_STACK f_seek P_((long place, int fh, int how));
  128. long ARGS_ON_STACK f_dup P_((int fh));
  129. long ARGS_ON_STACK f_force P_((int newh, int oldh));
  130. long ARGS_ON_STACK f_datime P_((short *timeptr, int fh, int rwflag));
  131. long ARGS_ON_STACK f_lock P_((int fh, int mode, long start, long length));
  132. long ARGS_ON_STACK f_pipe P_((short *usrh));
  133. long ARGS_ON_STACK f_cntl P_((int fh, long arg, int cmd));
  134. long ARGS_ON_STACK f_select P_((unsigned timeout, long *rfdp, long *wfdp, long *xfdp));
  135. long ARGS_ON_STACK f_midipipe P_((int pid, int in, int out));
  136.  
  137. /* dosmem.c */
  138. long ARGS_ON_STACK m_addalt P_((long start, long size));
  139. long _do_malloc P_((MMAP map, long size, int mode));
  140. long ARGS_ON_STACK m_xalloc P_((long size, int mode));
  141. long ARGS_ON_STACK m_alloc P_((long size));
  142. long ARGS_ON_STACK m_free P_((virtaddr block));
  143. long ARGS_ON_STACK m_shrink P_((int dummy, virtaddr block, long size));
  144. long ARGS_ON_STACK p_exec P_((int mode, void *ptr1, void *ptr2, void *ptr3));
  145. long terminate P_((int code, int que));
  146. long ARGS_ON_STACK p_term P_((int code));
  147. long ARGS_ON_STACK p_term0 P_((void));
  148. long ARGS_ON_STACK p_termres P_((long save, int code));
  149. long ARGS_ON_STACK p_waitpid P_((int pid, int nohang, long *rusage));
  150. long ARGS_ON_STACK p_wait3 P_((int nohang, long *rusage));
  151. long ARGS_ON_STACK p_wait P_((void));
  152. long ARGS_ON_STACK p_vfork P_((void));
  153. long ARGS_ON_STACK p_fork P_((void));
  154.  
  155. /* dossig.c */
  156. long ARGS_ON_STACK p_kill P_((int pid, int sig));
  157. long ARGS_ON_STACK p_sigaction P_((int sig, const struct sigaction *act,
  158.              struct sigaction *oact));
  159. long ARGS_ON_STACK p_signal P_((int sig, long handler));
  160. long ARGS_ON_STACK p_sigblock P_((ulong mask));
  161. long ARGS_ON_STACK p_sigsetmask P_((ulong mask));
  162. long ARGS_ON_STACK p_sigpending P_((void));
  163. long ARGS_ON_STACK p_sigpause P_((ulong mask));
  164.  
  165. /* filesys.c */
  166. void init_drive P_((int drv));
  167. void init_filesys P_((void));
  168. void load_filesys P_((void));
  169. void close_filesys P_((void));
  170. void ARGS_ON_STACK changedrv P_((unsigned drv));
  171. int disk_changed P_((int drv));
  172. long relpath2cookie
  173.     P_((fcookie *dir, const char *path, char *lastnm, fcookie *res, int depth));
  174. long path2cookie P_((const char *path, char *lastname, fcookie *res));
  175. FILEPTR *new_fileptr P_((void));
  176. void dispose_fileptr P_((FILEPTR *f));
  177. int ARGS_ON_STACK denyshare P_((FILEPTR *list, FILEPTR *newfileptr));
  178. int denyaccess P_((XATTR *, unsigned));
  179. LOCK * ARGS_ON_STACK denylock P_((LOCK *list, LOCK *newlock));
  180. long dir_access P_((fcookie *, unsigned));
  181. int has_wild P_((const char *name));
  182. void copy8_3 P_((char *dest, const char *src));
  183. int pat_match P_((const char *name, const char *template));
  184. int samefile P_((fcookie *, fcookie *));
  185.  
  186. /* main.c */
  187. void restr_intr P_((void));
  188. void ARGS_ON_STACK enter_kernel P_((void));
  189. void ARGS_ON_STACK leave_kernel P_((void));
  190. #ifdef __GNUC__
  191. int main P_((int argc, char **argv, char **envp));
  192. #else
  193. int main P_((int argc, char **argv));
  194. #endif
  195. void install_cookies P_((void));
  196. void load_config P_((void));
  197.  
  198. /* mem.c */
  199. void init_mem P_((void));
  200. int add_region P_((MMAP map, ulong place, ulong size, unsigned mflags));
  201. void init_core P_((void));
  202. void init_swap P_((void));
  203. MEMREGION *new_region P_((void));
  204. void dispose_region P_((MEMREGION *m));
  205. virtaddr attach_region P_((PROC *proc, MEMREGION *reg));
  206. void detach_region P_((PROC *proc, MEMREGION *reg));
  207. MEMREGION *get_region P_((MMAP map, ulong size));
  208. void free_region P_((MEMREGION *reg));
  209. long shrink_region P_((MEMREGION *reg, ulong newsize));
  210. long max_rsize P_((MMAP map));
  211. long tot_rsize P_((MMAP map, int flag));
  212. virtaddr alloc_region P_((MMAP map, ulong size));
  213. MEMREGION *create_env P_((const char *env));
  214. MEMREGION *create_base P_((const char *cmd, MEMREGION *env, ulong flags, ulong prgsize));
  215. MEMREGION *load_region P_((const char *name, MEMREGION *env, const char *cmdlin, XATTR *x,
  216.             MEMREGION **text));
  217. MEMREGION *get_text_seg P_((FILEPTR *f, FILEHEAD *fh, XATTR *xp));
  218. long load_and_reloc P_((FILEPTR *f, FILEHEAD *fh, char *where, long start,
  219.             long nbytes, BASEPAGE *base));
  220. void rts P_((void));
  221. PROC *exec_region P_((PROC *p, MEMREGION *mem, int thread));
  222. long memused P_((PROC *p));
  223. void recalc_maxmem P_((PROC *p));
  224. int valid_address P_((long addr));
  225. void DUMPMEM P_((MMAP map));
  226. void sanity_check P_((MMAP map));
  227.  
  228. /* proc.c */
  229. PROC *new_proc P_((void));
  230. void dispose_proc P_((PROC *p));
  231. PROC *fork_proc P_((void));
  232. void init_proc P_((void));
  233. void reset_priorities P_((void));
  234. void run_next P_((PROC *p, int slices));
  235. void fresh_slices P_((int slices));
  236. void add_q P_((int que, PROC *proc));
  237. void rm_q P_((int que, PROC *proc));
  238. void ARGS_ON_STACK preempt P_((void));
  239. void ARGS_ON_STACK sleep P_((int que, long cond));
  240. void ARGS_ON_STACK wake P_((int que, long cond));
  241. void ARGS_ON_STACK wakeselect P_((long param));
  242. void DUMPPROC P_((void));
  243.  
  244. /* signal.c */
  245. long killgroup P_((int pgrp, int sig));
  246. void post_sig P_((PROC *p, int sig));
  247. void check_sigs P_((void));
  248. void raise P_((int sig));
  249. void bombs P_((int sig));
  250. void handle_sig P_((int sig));
  251. long ARGS_ON_STACK p_sigreturn P_((void));
  252. void stop P_((int sig));
  253. void exception P_((int sig));
  254. void sigbus P_((void));
  255. void sigaddr P_((void));
  256. void sigill P_((void));
  257. void sigpriv P_((void));
  258. void sigfpe P_((void));
  259. void sigtrap P_((void));
  260. void haltformat P_((void));
  261. void haltcpv P_((void));
  262.  
  263. /* timeout.c */
  264. TIMEOUT *addtimeout P_((long delta, void (*func)(PROC *p)));
  265. void cancelalltimeouts P_((void));
  266. void canceltimeout P_((TIMEOUT *which));
  267. void ARGS_ON_STACK timeout P_((void));
  268. void checkalarms P_((void));
  269. void ARGS_ON_STACK nap P_((unsigned n));
  270.  
  271. /* tty.c */
  272. long tty_read P_((FILEPTR *f, void *buf, long nbytes));
  273. long tty_write P_((FILEPTR *f, const void *buf, long nbytes));
  274. long tty_ioctl P_((FILEPTR *f, int mode, void *arg));
  275. long tty_getchar P_((FILEPTR *f, int mode));
  276. long tty_putchar P_((FILEPTR *f, long data, int mode));
  277.  
  278. /* util.c */
  279. MEMREGION *addr2mem P_((virtaddr a));
  280. PROC *pid2proc P_((int pid));
  281. int newpid P_((void));
  282. void zero P_((char *place, long size));
  283. void * ARGS_ON_STACK kmalloc P_((long size));
  284. void *kcore P_((long size));
  285. void ARGS_ON_STACK kfree P_((void *place));
  286. void * ARGS_ON_STACK umalloc P_((long size));
  287. void ARGS_ON_STACK ufree P_((void *block));
  288. void ARGS_ON_STACK ms_time P_((ulong ms, short *timeptr));
  289. long ARGS_ON_STACK unixtim P_((unsigned time, unsigned date));
  290. long ARGS_ON_STACK dostim P_((long t));
  291. int ARGS_ON_STACK strnicmp P_((const char *str1, const char *str2, int len));
  292. int ARGS_ON_STACK stricmp P_((const char *str1, const char *str2));
  293. char * ARGS_ON_STACK strlwr P_((char *s));
  294. char * ARGS_ON_STACK strupr P_((char *s));
  295.  
  296. #ifdef OWN_LIB
  297. int strncmp P_((const char *str1, const char *str2, int len));
  298. int strcmp P_((const char *str1, const char *str2));
  299. char *strcat P_((char *, const char *));
  300. char *strcpy P_((char *, const char *));
  301. char *strncpy P_((char *, const char *, int));
  302. int strlen P_((const char *));
  303. char *strrchr P_((const char *, int));
  304. int toupper P_((int));
  305. int tolower P_((int));
  306. long atol P_((const char *));
  307. #endif /* OWN_LIB */
  308.  
  309. /* biosfs.c */
  310. void biosfs_init P_((void));
  311. void ARGS_ON_STACK mouse_handler P_((const char *buf));
  312. long ARGS_ON_STACK nocreat P_((fcookie *dir, const char *name, unsigned mode, int attrib,
  313.          fcookie *fc));
  314. long ARGS_ON_STACK nomkdir    P_((fcookie *dir, const char *name, unsigned mode));
  315. long ARGS_ON_STACK nowritelabel P_((fcookie *dir, const char *name));
  316. long ARGS_ON_STACK noreadlabel P_((fcookie *dir, char *name, int namelen));
  317. long ARGS_ON_STACK nosymlink P_((fcookie *dir, const char *name, const char *to));
  318. long ARGS_ON_STACK noreadlink P_((fcookie *dir, char *buf, int buflen));
  319. long ARGS_ON_STACK nohardlink P_((fcookie *, const char *, fcookie *, const char *));
  320. long ARGS_ON_STACK nofscntl P_((fcookie *dir, const char *name, int cmd, long arg));
  321. long ARGS_ON_STACK nodskchng P_((int drv));
  322. int set_auxhandle P_((PROC *, int));
  323.  
  324. /* pipefs.c */
  325.  
  326. /* procfs.c */
  327.  
  328. /* tosfs.c */
  329.  
  330. /* unifs.c */
  331. void unifs_init P_((void));
  332.  
  333. /* debug.c */
  334. int ARGS_ON_STACK ksprintf P_((char *, const char *, ...));
  335. void debug_ws P_((const char *s));
  336. void ARGS_ON_STACK Trace P_((const char *s, ...));
  337. void ARGS_ON_STACK Debug P_((const char *s, ...));
  338. void ARGS_ON_STACK ALERT P_((const char *s, ...));
  339. EXITING void ARGS_ON_STACK FATAL P_((const char *s, ...));
  340. EXITING void HALT P_((void));
  341. void do_func_key P_((int));
  342.  
  343. /* rendez.c */
  344. long ARGS_ON_STACK p_msg P_((int mode, long ARGS_ON_STACK mbid, char *ptr));
  345. long ARGS_ON_STACK p_semaphore P_((int mode, long ARGS_ON_STACK id, long timeout));
  346. void free_semaphores P_((int pid));
  347.